When linking 2 formal modules for which there doesn't exist a specific link module, DOORS is capable of creating an automatic link module called "DOORS Links". This link module is placed within the folder of the source module. for LinkModuleDescriptor in Folder do
loop. When I do that, i can access all link sets that have been manually created, but for some strange reason I cannot access the automatically generated link set.
Module lnkMod = current;
mPath = path(lnkMod)
mName = name(lnkMod);
Folder f = current
LinkModuleDescriptor l
for l in f do {
string l_name = getName(l) ""
if (l_name == mPath "/" mName) {
string source_mod = getSourceName(l)
string target_mod = getTargetName(l)
Module mod_s = read(source_mod)
Module mod_t = read(target_mod)
string sourceModPath = path mod_s
string targetModPath = path mod_t
Object obj
for obj in mod_s do {
Link lnk
for lnk in obj -> (mPath "/" mName) do {
string source_id = identifier(obj)
Object obj_t = target(lnk)
string target_id = identifier(obj_t)
out << source_mod "#" source_id "," target_mod "#" target_id "\n"
}
}
}
}
SystemAdmin - Thu Sep 24 09:22:42 EDT 2009 |
Re: No link module descriptor for automatically generated link modules >> LinkSet: an object in a Link Module to which links are associated; and a >> DefaultLinkModule DLM aka LinkSetPairing LSP aka LinkModuleDescriptor LMD: all of which define which actual LinkSet to use when creating links. The 'LinkSet' tab in the Module Properties sheet is discussing LSPs, not actual LinkSets. When you insert a target module and link module therein, you are telling DOORS to use that link module when, in the future, links are created. No LinkSet is created at the time, although one may already exist. The 'for LMD in Folder do' loop looks through the LSPs of modules in the folder. Your code will only find 'linksets' for which there are LMDs defined in the corresponding source modules. Since it appears to run from an open Link Module, the 'current' folder is the one housing the link module, not the one selected in the Explorer. It looks to me like you want to select a folder, then open all the modules in the folder and get their outlink going through a specific link module.
|